package org.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

//@Component
//@Aspect
public class CudOperationServiceParameterAspect {

	@Pointcut("execution(* org.cuddao.service.*(..))")
	public void pointCut() {
	}
	
	@Before("pointCut()")
	public void before(JoinPoint joinPoint) {
		//如果需要这里可以取出参数进行处理
		Object[] args = joinPoint.getArgs();
		for(int i=0;i<args.length;i++){
			System.out.println(args[i]);
		}
		
		System.out.println("before aspect executing");
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
